package flatbuf
import (
flatbuffers "github.com/google/flatbuffers/go"
)
type RecordBatch struct {
_tab flatbuffers .Table
}
func GetRootAsRecordBatch (buf []byte , offset flatbuffers .UOffsetT ) *RecordBatch {
n := flatbuffers .GetUOffsetT (buf [offset :])
x := &RecordBatch {}
x .Init (buf , n +offset )
return x
}
func FinishRecordBatchBuffer (builder *flatbuffers .Builder , offset flatbuffers .UOffsetT ) {
builder .Finish (offset )
}
func GetSizePrefixedRootAsRecordBatch (buf []byte , offset flatbuffers .UOffsetT ) *RecordBatch {
n := flatbuffers .GetUOffsetT (buf [offset +flatbuffers .SizeUint32 :])
x := &RecordBatch {}
x .Init (buf , n +offset +flatbuffers .SizeUint32 )
return x
}
func FinishSizePrefixedRecordBatchBuffer (builder *flatbuffers .Builder , offset flatbuffers .UOffsetT ) {
builder .FinishSizePrefixed (offset )
}
func (rcv *RecordBatch ) Init (buf []byte , i flatbuffers .UOffsetT ) {
rcv ._tab .Bytes = buf
rcv ._tab .Pos = i
}
func (rcv *RecordBatch ) Table () flatbuffers .Table {
return rcv ._tab
}
func (rcv *RecordBatch ) Length () int64 {
o := flatbuffers .UOffsetT (rcv ._tab .Offset (4 ))
if o != 0 {
return rcv ._tab .GetInt64 (o + rcv ._tab .Pos )
}
return 0
}
func (rcv *RecordBatch ) MutateLength (n int64 ) bool {
return rcv ._tab .MutateInt64Slot (4 , n )
}
func (rcv *RecordBatch ) Nodes (obj *FieldNode , j int ) bool {
o := flatbuffers .UOffsetT (rcv ._tab .Offset (6 ))
if o != 0 {
x := rcv ._tab .Vector (o )
x += flatbuffers .UOffsetT (j ) * 16
obj .Init (rcv ._tab .Bytes , x )
return true
}
return false
}
func (rcv *RecordBatch ) NodesLength () int {
o := flatbuffers .UOffsetT (rcv ._tab .Offset (6 ))
if o != 0 {
return rcv ._tab .VectorLen (o )
}
return 0
}
func (rcv *RecordBatch ) Buffers (obj *Buffer , j int ) bool {
o := flatbuffers .UOffsetT (rcv ._tab .Offset (8 ))
if o != 0 {
x := rcv ._tab .Vector (o )
x += flatbuffers .UOffsetT (j ) * 16
obj .Init (rcv ._tab .Bytes , x )
return true
}
return false
}
func (rcv *RecordBatch ) BuffersLength () int {
o := flatbuffers .UOffsetT (rcv ._tab .Offset (8 ))
if o != 0 {
return rcv ._tab .VectorLen (o )
}
return 0
}
func (rcv *RecordBatch ) Compression (obj *BodyCompression ) *BodyCompression {
o := flatbuffers .UOffsetT (rcv ._tab .Offset (10 ))
if o != 0 {
x := rcv ._tab .Indirect (o + rcv ._tab .Pos )
if obj == nil {
obj = new (BodyCompression )
}
obj .Init (rcv ._tab .Bytes , x )
return obj
}
return nil
}
func (rcv *RecordBatch ) VariadicBufferCounts (j int ) int64 {
o := flatbuffers .UOffsetT (rcv ._tab .Offset (12 ))
if o != 0 {
a := rcv ._tab .Vector (o )
return rcv ._tab .GetInt64 (a + flatbuffers .UOffsetT (j *8 ))
}
return 0
}
func (rcv *RecordBatch ) VariadicBufferCountsLength () int {
o := flatbuffers .UOffsetT (rcv ._tab .Offset (12 ))
if o != 0 {
return rcv ._tab .VectorLen (o )
}
return 0
}
func (rcv *RecordBatch ) MutateVariadicBufferCounts (j int , n int64 ) bool {
o := flatbuffers .UOffsetT (rcv ._tab .Offset (12 ))
if o != 0 {
a := rcv ._tab .Vector (o )
return rcv ._tab .MutateInt64 (a +flatbuffers .UOffsetT (j *8 ), n )
}
return false
}
func RecordBatchStart (builder *flatbuffers .Builder ) {
builder .StartObject (5 )
}
func RecordBatchAddLength (builder *flatbuffers .Builder , length int64 ) {
builder .PrependInt64Slot (0 , length , 0 )
}
func RecordBatchAddNodes (builder *flatbuffers .Builder , nodes flatbuffers .UOffsetT ) {
builder .PrependUOffsetTSlot (1 , flatbuffers .UOffsetT (nodes ), 0 )
}
func RecordBatchStartNodesVector (builder *flatbuffers .Builder , numElems int ) flatbuffers .UOffsetT {
return builder .StartVector (16 , numElems , 8 )
}
func RecordBatchAddBuffers (builder *flatbuffers .Builder , buffers flatbuffers .UOffsetT ) {
builder .PrependUOffsetTSlot (2 , flatbuffers .UOffsetT (buffers ), 0 )
}
func RecordBatchStartBuffersVector (builder *flatbuffers .Builder , numElems int ) flatbuffers .UOffsetT {
return builder .StartVector (16 , numElems , 8 )
}
func RecordBatchAddCompression (builder *flatbuffers .Builder , compression flatbuffers .UOffsetT ) {
builder .PrependUOffsetTSlot (3 , flatbuffers .UOffsetT (compression ), 0 )
}
func RecordBatchAddVariadicBufferCounts (builder *flatbuffers .Builder , variadicBufferCounts flatbuffers .UOffsetT ) {
builder .PrependUOffsetTSlot (4 , flatbuffers .UOffsetT (variadicBufferCounts ), 0 )
}
func RecordBatchStartVariadicBufferCountsVector (builder *flatbuffers .Builder , numElems int ) flatbuffers .UOffsetT {
return builder .StartVector (8 , numElems , 8 )
}
func RecordBatchEnd (builder *flatbuffers .Builder ) flatbuffers .UOffsetT {
return builder .EndObject ()
}
The pages are generated with Golds v0.8.7 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .